<?php
//课程设置
class kechengAction extends Action{

	function index(){
		$user = D('kecheng');
		$list = $user->field('url,title,photo')->order('end_time asc')->findAll();
		$this->assign('list',$list);
		
		pubAction::get_slist();
		$this->display('default@kecheng');
	}
	
	function show(){
		$id = addslashes($_GET['url']);
		$user = D('kecheng');
		$lab = $user->where("url='$id'")->find();
		$this->assign('lab',$lab);
		
		pubAction::get_slist();
		$this->display('default@kecheng_show');
	}
}
?>